package com.apestech.framework.xml.sql;

/**
 * SQL注释字串处理
 *
 * @author hup
 * @create 2018-10-24-11:50
 */
public class SqlComment {

    private String sql;

    public SqlComment(String sql){
        this.sql=sql;
    }

    public String getSql(){
        if(sql!=null && !"".equals(sql.trim())){
            int pos=sql.indexOf("--");
            if(pos>=0){
                String s1=sql.substring(0, pos);
                return s1;
            }
        }
        return sql;
    }

}
